<template>
	<view class="">
		<view class="industry-box mg-lr-25" v-for="(industryItem,index) in newsListData" :key="index"
			@click="newsDetail(industryItem)">
			<u-lazy-load class="industry-r-img" :image="industryItem.picture" threshold="300"></u-lazy-load>
			<view class="zixun-list flex-js-ac">
				<text class="line-2">{{industryItem.title}}</text>
				<!-- <u-lazy-load class="news-r-img" :image="image" height="142"></u-lazy-load> -->

			</view>
			<!-- <view class="mg-lr-25" style="height: 1rpx;background-color: #E5E5E5;"></view> -->

		</view>
	</view>
</template>

<script>
	export default {
		name: "xh-industry",
		props:{
			newsListData:{
				type:Array,
				default:[]
			}
		},
		data() {
			return {
				imageUrl:"",
				list: [{
						src: "https://gtd.alicdn.com/sns_logo/i1/TB124_3NXXXXXasXVXXSutbFXXX.jpg_240x240xz.jpg",
					},
					{
						src: "https://gtd.alicdn.com/sns_logo/i7/TB1IWtgQFXXXXcmXFXXSutbFXXX.jpg_240x240xz.jpg",
					},
					{
						src: "https://gtd.alicdn.com/sns_logo/i1/TB1_f_PLXXXXXbVXpXXSutbFXXX.jpg_240x240xz.jpg",
					},
					{
						// 这里图片不存在，会加载失败，显示错误的占位图
						src: "xxx",
					},
				]
			};
		},
		methods: {
			newsDetail(e) {
				this.$emit("toDetail", e)
			}
		}
	}
</script>

<style scoped>
	.industry-r-img {
		height: 354rpx;
		width: 100%;
	}

	.industry-box {
		margin-bottom: 20rpx;
		margin-top: 10rpx;
	}
	.zixun-list{
		margin-top: 10rpx;
		margin-bottom: 10rpx;
	}
</style>
